package top.banner.es;

import org.apache.http.HttpHost;
import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestHighLevelClient;

/**
 * ES 客户端
 *
 * @author XGL
 */
public class ESClient {

    public static RestHighLevelClient init() {
        //创建ES客户端
        return new RestHighLevelClient(
                RestClient.builder(new HttpHost("localhost", 9200, "http"))
        );
    }

}
